<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$sql='SELECT pmID, pmNAME FROM PluginMenu ORDER BY pmNAME';
$result=mysql_query($sql);

while($row=mysql_fetch_array($result)){
    $id = $row['pmID'];
    $thing = $row['pmNAME'];
    $options.="<OPTION VALUE=\"$id\">" . $thing;
}
echo '
<div id="content">
<h5 class="info-title">Site Properties</h5>
<h2>Create a new menu</h2>
<p>To create a new menu, type the new menu name and select an available menu type.</p>


<form action="plugin/base/cms/properties/newsitemenu.php" method="post">
<table border="0">
<tr>
    <td>Type:</td>
    <td><select name="pmID">
<OPTION VALUE=0>Select Type...',$options,'</select>
    </td>
  </tr>

<tr>
    <td>Name:</td>
    <td>
      <input type = "text" name="newsitemenu" size="74">
    </td>
 </tr>
 <tr>
    <td><input type="hidden" name="site"  width="0" value=', $hisite  ,'></td>
    <td>
      <input type="submit" value="Create" name="newform">
    </td>
 </tr>
 </table>
</form>


<h2>Menu Layout</h2>
<p>Edit menu by first selecting the menu to edit.
Then drag-and drop menu items to rearrange menu layout.
Press button to save changes.</p>
<pre>
<div id="info">Waiting for update</div>
</pre>
<ul id="test-list">';



$ddsql='SELECT menuID, menuNAME, menuINDEX FROM SiteMenu WHERE menuSITE =' . $_GET['site'] . ' ORDER BY menuINDEX';
$ddresult=mysql_query($ddsql);
$i=0;
while($row=mysql_fetch_array($ddresult)){
    $id = $row['menuID'];
    $thing = $row['menuNAME'];
    echo '<li id="listItem_', $id ,'"><img src="jquery/drag/arrow.png" alt="move" width="16" height="16" class="handle" /><strong>', $thing, '</strong></li>';
  
    $i = $i+1;
}
echo '</ul>';



echo'

<a href="#top">Top ^</a>

';
echo "
</div>
</div><!-- end of inside -->
";
?>

